import { PostApi, GetApiHad } from "../request/Index";

export interface ILogin {
  username: string;
  password: string;
}
enum Api {
  MenuDataApi = "/api/menu",
  LoginApi = "/api/login",
  KeyValueApi='/api/keyvalue',
}

export async function MenuDataApi(userId: String) {
  return GetApiHad(Api.MenuDataApi, { userId });
}

export async function LoginApi(params: ILogin) {
  return PostApi(Api.LoginApi, params);
}

export async function KeyValueApi(entityName:String) {
    return GetApiHad(Api.KeyValueApi, { entityName });
}